package twoarray;

import java.time.Year;

public class twoArray1 {
    public static void main(String[] args) {
        int[][] arr = {
                {22,66,44},
                {77,33,88},
                {25,45,65},
                {11,66,99}
        };

        int yearSum = 0;
        for (int i = 0; i < arr.length; i++) {
            int[] qutrterArr = arr[i];
            int sum = getSum(qutrterArr);
            System.out.println(sum);
            yearSum = yearSum + sum;
        }
        System.out.println(yearSum);
    }

    public static int getSum(int[] arr){
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum = sum + arr[i];
        }
        return sum;
    }
}
